package com.weetop.cfw.bean;

import com.chad.library.adapter.base.entity.AbstractExpandableItem;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.weetop.cfw.home_page.adapter.ChooseAddressRVAdapter;

import java.util.List;

public class AllSubSiteListBean extends ErrorBean {


    private List<DataBean> data;

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean extends AbstractExpandableItem<DataBean.SdataBean> implements MultiItemEntity {
        /**
         * provid : 268
         * provname : 安徽
         * flet : A
         * sdata : [{"siteid":195,"sitename":"抚州市","provid":268,"provname":"安徽","cityid":406,"cityname":"抚州","sitelogo":"","maplng":"116.365687","maplat":"27.956935"},{"siteid":196,"sitename":"合肥市","provid":268,"provname":"安徽","cityid":407,"cityname":"合肥","sitelogo":"","maplng":"117.235741","maplat":"31.829032"},{"siteid":197,"sitename":"六安市","provid":268,"provname":"安徽","cityid":408,"cityname":"六安","sitelogo":"","maplng":"116.526412","maplat":"31.743417"},{"siteid":198,"sitename":"宿州市","provid":268,"provname":"安徽","cityid":409,"cityname":"宿州","sitelogo":"","maplng":"116.968818","maplat":"33.654019"},{"siteid":199,"sitename":"阜阳市","provid":268,"provname":"安徽","cityid":410,"cityname":"阜阳","sitelogo":"","maplng":"115.818134","maplat":"32.898972"},{"siteid":200,"sitename":"安庆市","provid":268,"provname":"安徽","cityid":411,"cityname":"安庆","sitelogo":"","maplng":"117.065333","maplat":"30.534441"},{"siteid":201,"sitename":"马鞍山市","provid":268,"provname":"安徽","cityid":412,"cityname":"马鞍山","sitelogo":"","maplng":"118.515306","maplat":"31.679215"},{"siteid":202,"sitename":"蚌埠市","provid":268,"provname":"安徽","cityid":413,"cityname":"蚌埠","sitelogo":"","maplng":"117.399538","maplat":"32.924917"},{"siteid":203,"sitename":"淮北市","provid":268,"provname":"安徽","cityid":414,"cityname":"淮北","sitelogo":"","maplng":"116.802811","maplat":"33.964531"},{"siteid":204,"sitename":"淮南市","provid":268,"provname":"安徽","cityid":415,"cityname":"淮南","sitelogo":"","maplng":"117.005811","maplat":"32.63428"},{"siteid":205,"sitename":"宣城市","provid":268,"provname":"安徽","cityid":416,"cityname":"宣城","sitelogo":"","maplng":"118.767262","maplat":"30.95007"},{"siteid":206,"sitename":"黄山市","provid":268,"provname":"安徽","cityid":417,"cityname":"黄山","sitelogo":"","maplng":"118.348612","maplat":"29.725743"},{"siteid":207,"sitename":"铜陵市","provid":268,"provname":"安徽","cityid":418,"cityname":"铜陵","sitelogo":"","maplng":"117.819631","maplat":"30.954206"},{"siteid":208,"sitename":"亳州市","provid":268,"provname":"安徽","cityid":419,"cityname":"亳州","sitelogo":"","maplng":"115.787341","maplat":"33.851122"},{"siteid":209,"sitename":"池州市","provid":268,"provname":"安徽","cityid":420,"cityname":"池州","sitelogo":"","maplng":"117.501874","maplat":"30.672873"},{"siteid":210,"sitename":"巢湖市","provid":268,"provname":"安徽","cityid":421,"cityname":"巢湖","sitelogo":"","maplng":"117.89586","maplat":"31.630971"},{"siteid":211,"sitename":"滁州市","provid":268,"provname":"安徽","cityid":422,"cityname":"滁州","sitelogo":"","maplng":"118.340558","maplat":"32.265179"}]
         */

        private int provid;
        private String provname;
        private String flet;
        private List<SdataBean> sdata;

        public int getProvid() {
            return provid;
        }

        public void setProvid(int provid) {
            this.provid = provid;
        }

        public String getProvname() {
            return provname;
        }

        public void setProvname(String provname) {
            this.provname = provname;
        }

        public String getFlet() {
            return flet;
        }

        public void setFlet(String flet) {
            this.flet = flet;
        }

        public List<SdataBean> getSdata() {
            return sdata;
        }

        public void setSdata(List<SdataBean> sdata) {
            this.sdata = sdata;
        }

        @Override
        public String toString() {
            return "DataBean{" +
                    "provid=" + provid +
                    ", provname='" + provname + '\'' +
                    ", flet='" + flet + '\'' +
                    ", sdata=" + sdata +
                    '}';
        }


        @Override
        public int getLevel() {
            return 1;
        }

        @Override
        public int getItemType() {
            return ChooseAddressRVAdapter.TYPE_LEVEL_0;
        }

        public static class SdataBean implements MultiItemEntity{
            /**
             * siteid : 195
             * sitename : 抚州市
             * provid : 268
             * provname : 安徽
             * cityid : 406
             * cityname : 抚州
             * sitelogo :
             * maplng : 116.365687
             * maplat : 27.956935
             */

            private int siteid;
            private String sitename;
            private int provid;
            private String provname;
            private int cityid;
            private String cityname;
            private String sitelogo;
            private String maplng;
            private String maplat;

            public SdataBean(int siteid) {
                this.siteid = siteid;
            }

            public int getSiteid() {
                return siteid;
            }

            public void setSiteid(int siteid) {
                this.siteid = siteid;
            }

            public String getSitename() {
                return sitename;
            }

            public void setSitename(String sitename) {
                this.sitename = sitename;
            }

            public int getProvid() {
                return provid;
            }

            public void setProvid(int provid) {
                this.provid = provid;
            }

            public String getProvname() {
                return provname;
            }

            public void setProvname(String provname) {
                this.provname = provname;
            }

            public int getCityid() {
                return cityid;
            }

            public void setCityid(int cityid) {
                this.cityid = cityid;
            }

            public String getCityname() {
                return cityname;
            }

            public void setCityname(String cityname) {
                this.cityname = cityname;
            }

            public String getSitelogo() {
                return sitelogo;
            }

            public void setSitelogo(String sitelogo) {
                this.sitelogo = sitelogo;
            }

            public String getMaplng() {
                return maplng;
            }

            public void setMaplng(String maplng) {
                this.maplng = maplng;
            }

            public String getMaplat() {
                return maplat;
            }

            public void setMaplat(String maplat) {
                this.maplat = maplat;
            }

            @Override
            public String toString() {
                return "SdataBean{" +
                        "siteid=" + siteid +
                        ", sitename='" + sitename + '\'' +
                        ", provid=" + provid +
                        ", provname='" + provname + '\'' +
                        ", cityid=" + cityid +
                        ", cityname='" + cityname + '\'' +
                        ", sitelogo='" + sitelogo + '\'' +
                        ", maplng='" + maplng + '\'' +
                        ", maplat='" + maplat + '\'' +
                        '}';
            }

            @Override
            public int getItemType() {
                return ChooseAddressRVAdapter.TYPE_LEVEL_1;
            }
        }


    }

    @Override
    public String toString() {
        return "AllSubSiteListBean{" +
                "data=" + data +
                '}';
    }
}
